package com.exercise.textfont

import android.content.Context
import android.content.Intent
import android.view.LayoutInflater
import com.exercise.struct.base.BaseActivity
import com.exercise.struct.viewmodel.BaseViewModel
import com.exercise.widgets.databinding.ActivityEmojiBinding

class EmojiActivity : BaseActivity<BaseViewModel, ActivityEmojiBinding>() {
    override val bindingInflater: (LayoutInflater) -> ActivityEmojiBinding
        get() = ActivityEmojiBinding::inflate
    override val modelClass: Class<BaseViewModel>
        get() = BaseViewModel::class.java

    override fun initData() {
    }

    override fun initView() {
        binding.emojiPicker.setOnEmojiPickedListener {
            binding.editText.append(it.emoji)
        }
    }

    companion object {
        fun start(context: Context) {
            Intent(context, EmojiActivity::class.java)
                .also {
                    context.startActivity(it)
                }
        }
    }
}